<include file="./Tpl/Admin/header.html" />
<div class="main">
  <div class="main_title">
    <div class="search" style="width:800px;"> <span>账号：</span>
      <input type="text" name="key_username" id="key_username" value="{$key_username}"/>
      <span>邮箱：</span>
      <input type="text" name="key_email" id="key_email" value="{$key_email}"/>
      <span>推广链接：</span>
      <input type="text" name="key_invit" id="key_invit" value="{$key_invit}"/>
      <input type="button" id="s_btn" value=" 搜 索 "/>
      <script language="javascript">
			    $('#s_btn').click(function(){
					 window.location.href='{$path}/User/index/key_email/'+$('#key_email').val()+'/key_username/'+$('#key_username').val()+'/key_invit/'+$('#key_invit').val();
				});
			</script>
    </div>
    <img src="/Public/Admin/images/book1.gif"/>&nbsp;&nbsp;会员管理 </div>
  <eq name="module" value="list">
    <if condition="$module eq 'list'">
    <div class="list_body">
      <table cellspacing=0 cellpadding=0 border=0>
        <tr>
          <th width="30">选择</th>
          <th>推广链接</th>
          <th>帐号</th>
          <th>密码</th>
          <th>姓名</th>
          <th>手机号</th>
          <th>邮箱</th>
          <th>人民币</th>
          <th>BPC</th>
          <th>BPG</th>
          <th width="70">注册时间</th>
          <th width="190">操作</th>
        </tr>
        <volist name="list" id="vo" empty="$empty">
          <tr>
            <td><input type="checkbox" class="id" name="id[]" value="{$vo.id}"></td>
            <td>{$vo.invit}</td>
            <td>{$vo.username|default='无'}</td>
            <td>{$vo.pwdshow|default='无'}</td>
            <td>{$vo.xm|default='无'}</td>
            <td>{$vo.phone|default='无'}</td>
            <td>{$vo.email|default='无'}</td>
            <td>{$vo.rmb|default='0'}</td>
            <td>{$vo.xnb|default='0'}</td>
            <td>{$vo.ks|default='0'}</td>
            <td>{$vo.ctime|date='Y-m-d H:i:s',###}</td>
            <td nowrap="nowrap"><div align="center"><a href="{$path}/Fill/index/userid/{$vo.id|default='0'}">充值记录</a>; <a href="{$path}/Trans/index/userid/{$vo.id|default='0'}">交易记录</a>; <a href="{$path}/Chongzhi/index/username/{$vo.username|default='0'}">充值</a>; <a href="{$path}/User/set/id/{$vo.id}">修改</a>; <a href="{$path}/User/del/id/{$vo.id}">删除</a></div></td>
          </tr>
        </volist>
        <tr>
          <td colspan=14 class="page"><!--<input type="button" id="all" value=" 全选 ">
            <input type="button" id="all_return" value=" 全不选 ">
            <input type="button" id="dels" value=" 批量删除 ">
            <input type="button" id="add" value=" 添加交易类型 ">
            <a href="{$path}/User/index/page/1">首页</a> <a href="{$path}/User/index/page/{$page-1}">上一页</a> <a href="{$path}/User/index/page/{$page+1}">下一页</a> <a href="{$path}/User/index/page/{$page_num}">尾页</a>  -->{$page}</td>
        </tr>
      </table>
    </div>
    <elseif condition="$module eq 'fill'"/>
    <div class="main_body">
      <form action="{$path}/Fill/insert" method="post">
        <input type="hidden" name="uid" value="{$id|default='0'}"/>
        <table cellspacing=0 cellpadding=0 border=0>
          <tr>
            <td>账号</td>
            <td>{$username}</td>
          </tr>
          <tr>
            <td>数量</td>
            <td><input type="text" name="num"/></td>
          </tr>
        </table>
        <div>
          <input type="submit" value="提交"/>
        </div>
      </form>
    </div>
    <else/>
    <div class="main_body">
      <form action="{$path}/User/update" method="post">
        <input type="hidden" name="id" value="{$id|default='0'}"/>
        <table cellspacing=0 cellpadding=0 border=0>
          <tr>
            <td>账号</td>
            <td><input type="text" name="username" value="{$username}"/></td>
          </tr>
		     <tr>
            <td>电话</td>
            <td><input type="text" name="phone" value="{$phone}"/></td>
          </tr>
          <tr>
            <td>邮箱</td>
            <td><input type="text" name="email" value="{$email}"/></td>
          </tr>
          <tr>
            <td>人民币</td>
            <td><input type="text" name="rmb" value="{$rmb}"/></td>
          </tr>
          <tr>
            <td>BPC</td>
            <td><input type="text" name="xnb" value="{$xnb}"/></td>
          </tr>
          <tr>
            <td>BPG</td>
            <td><input type="text" name="ks" value="{$ks}"/></td>
          </tr>
          <tr>
            <td>密码</td>
            <td><input type="password" name="password" value="{$pwdshow}"/></td>
          </tr>
        </table>
        <div>
          <input type="submit" value="提交"/>
        </div>
      </form>
    </div>
  </eq>
</div>
<include file="./Tpl/Admin/footer.html" />
<script language="javascript">
$(document).ready(function(){
    $('#all').click(function(){
	    $('.id').attr('checked',true);
	});
	$('#all_return').click(function(){
	    $('.id').attr('checked',false);
	});
    $('#dels').click(function(){

		f = 0;
	    $('.id').each(function(){
		    if($(this).attr('checked')) f = 1;
		});
		
        if(f==0){
		    alert('请选择要删除的项！');
		}else{
		    $('#formid').submit();
		}
	});
	$('#add').click(function(){
	    location.href="{$path}/Market/add";
	});
	
});
</script>
<script type="text/javascript">
	$(document).ready(function(e) {
        //打开子菜单
			$("#collapseTwo").addClass("in");	
    });
</script>
